package com.example.dw.apptest1;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;

public class Page61 extends AppCompatActivity {
    private EditText editText1,editText2,editText3,editText4;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.page61);
        editText1 = findViewById(R.id.edit6_1);
        editText2 = findViewById(R.id.edit6_2);
        editText3 = findViewById(R.id.edit6_3);
        editText4 = findViewById(R.id.edit6_4);
    }

    public void huoqu61(View view) {
        String s1 = editText1.getText().toString();
        String s2 = editText2.getText().toString();
        String s3 = editText3.getText().toString();
        String s4 = editText4.getText().toString();
        if (s2 != s3){
            Toast.makeText(this,"两次密码输入不相同，重新输入",Toast.LENGTH_SHORT);
            editText1.setText("");
            editText2.setText("");
            editText3.setText("");
            editText4.setText("");
        }else {
            Intent intent = new Intent(this, Page62.class);
            Bundle bundle = new Bundle();
            bundle.putString("user", s1);
            bundle.putString("password", s2);
            bundle.putString("email", s4);
            intent.putExtras(bundle);
            startActivity(intent);
        }
    }
}
